package pl.grabar.clinic.client.web.actions.admin.users;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.InterceptorRef;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;

import pl.grabar.clinic.client.web.actions.JsonPagedDataAction;
import pl.grabar.clinic.core.dao.Dao;
import pl.grabar.clinic.core.domain.person.User;

@ParentPackage(value = "json")
@Action("load")
@InterceptorRef("grabarStack")
@Results({ @Result(name = "success", type = "json") })
public class LoadUsersJsonAction extends JsonPagedDataAction<User> {

	private static final long serialVersionUID = -5509251712872009685L;

	@Autowired
	private Dao<User> userDao;

	@Override
	public void prepare() throws Exception {
		this.dao = userDao;
	}

	@Override
	public Integer getTotal() {
		return super.getTotal();
	}

	@Override
	public Integer getRecords() {
		return super.getRecords();
	}

	@Override
	public List<User> getData() {
		return super.getData();
	}
}
